// 查询参数
var params = {};

/**
 * 画面初期化处理
 */
$(function() {	
	setListTableCss("dataInfo");
	
	params.type = $('#type').val();
	params.workerCode = $('#workerCode').val();
	params.remark = $('#remark').val();
	params.evaStartTime = $('#evaStartTime').val();
	params.evaEndTime = $('#evaEndTime').val();
});

/**
 * 查看考核结果详细信息.
 * @return
 */
function detail(workerCode)
{
	$('#resultId').val(resultId);
	doAction(document.forms["evaResultForm"], "statistic/evaResult-detail.action");
}


function deleteEvaResult(resultId)
{
	if(confirm("确定要删除此条记录吗？"))
	{
		$('#resultId').val(resultId);
		doAction(document.forms["evaResultForm"], "statistic/evaResult-delete.action");
	}
}

/**
 * 选择工作人员
 * 
 * @param index
 * @return
 */
function selectWorker(index)
{
	var value = window.showModalDialog(path + '/system/worker-selectList.action', null, 'dialogHeight=500px; dialogWidth=700px;');
	if (value)
	{
		$('#workerCode').val(value.workerCode);
		$('#workerName').val(value.workerName);
	}
}

/**
 * 查询角色权限
 * @return
 */
function search()
{
	$("#pageNow").val("0");
	commonSearch();
}

/**
 * 导出Excel.
 * 
 * @return
 */
function excel()
{
	$('#download_type').val(params.type);
	$('#download_workerCode').val(params.workerCode);
	$('#download_remark').val(params.remark);
	$('#download_evaStartTime').val(params.evaStartTime);
	$('#download_evaEndTime').val(params.evaEndTime);
	document.forms["downloadFrm"].submit();
}

function commonSearch()
{
	doAction(document.forms["evaResultForm"],"statistic/evaResult-list.action");
}

/**
 * 分页
 * @return
 */
function page(pageNow)
{
	$("#pageNow").val(pageNow);
	commonSearch();
}
